<?php

	# connect to DB
	$conn = connectDB();
	
	# insert into DB
	$res = mysql_query("TRUNCATE TABLE image");
	$res = mysql_query("TRUNCATE TABLE wikiarticle");
	$res = mysql_query("TRUNCATE TABLE tags");
	$res = mysql_query("TRUNCATE TABLE related");
	
	echo "Table 'image' has been truncated<br>";
	echo "Table 'wikiarticle' has been truncated<br>";
	echo "Table 'tags' has been truncated<br>";
	echo "Table 'related' has been truncated<br><br>";
	
	# delete images in image store folder
	rmdirr("C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/cric/images/store/");
	
	echo "'images/store' folder entries are deleted";
	
	# close DB connection
	closeDB($conn);

?>